﻿@using ECG.Utility
@model List<ECG.Common.NewsListOldDto>
@if (Model.Any())
{
    <div class="newsOld_title">
        <h5>Các bài mới</h5>
    </div>
    <ul class="ulNewsOldTop list-style-none ul">
        @foreach (var item in Model)
        {
            var nDetailLink = Url.Action("NewsDetail", "News", new { id = item.Id, newsTitle = StringUtil.RemoveSpecialCharactersVn(item.Title) });
            var strIconNew = "";
            if (item.IconNew)
            {
                strIconNew = "class='n-iconNew'";
            }
            else
            {
                strIconNew = "";
            }
            <li @Html.Raw(strIconNew)>
                <h3>
                    <a href="@nDetailLink">
                        <span class="meta-nav">→</span>@item.Title (@item.CreateDate.ToString("dd/MM"))
                    </a>
                </h3>
            </li>
        }
    </ul>
}
